package pers.lmd.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import pers.lmd.domain.entity.Role;
import pers.lmd.service.IRoleService;
import pers.lmd.mapper.RoleMapper;
import org.springframework.stereotype.Service;

import java.math.BigInteger;
import java.util.ArrayList;
import java.util.List;
import java.util.stream.Collectors;

/**
* @author 10149
* @description 针对表【role】的数据库操作Service实现
* @createDate 2023-05-20 19:43:21
*/

@Service
public class RoleServiceImpl extends ServiceImpl<RoleMapper, Role>
    implements IRoleService {

    @Override
    public List<String> getRole(BigInteger id){
        return baseMapper.getRoleNameByUid(id).stream().map(Role::getName).collect(Collectors.toList());
    }
}




